home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Top 200 Programs
/
Top 200 Programs.iso
/
Bob8
/
THOMPSON
/
LIBERTY
/
PRODUCT
/
LB14W.EXE
/
CALLDLL3.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-02-01
|
837b
|
50 lines
'CALLDLL3.BAS Show how to draw text directly into a window using
'API calls
UpperLeftX = 10
UpperLeftY = 10
open "window" for window as #1
open "user.dll" for dll as #user
open "gdi.dll" for dll as #gdi
h = hwnd(#1)
calldll #user, "GetDC", _
h as word, _
hdc as word
x = 10
y = 10
text$ = "Ha ha ha!"
length = 9
for y = 10 to 100 step 20
calldll #gdi, "TextOut", _
hdc as word, _
x as short, _
y as short, _
text$ as struct, _
length as short, _
result as word
next x
calldll #user, "ReleaseDC", _
h as word, _
hdc as word, _
result as ushort
notice "Done."
close #user
close #gdi
close #1
end